package creational.facotrymethod;

public class Test {

    public static void main(String[] args) {

        HondaFactory hondaFactory1 = new HondaFactory();
        ICar hondaCar1 = hondaFactory1.createCar(1);
        hondaCar1.run();
        hondaCar1.stop();

        HondaFactory hondaFactory2 = new HondaFactory();
        ICar hondaCar2 = hondaFactory2.createCar(2);
        hondaCar2.run();
        hondaCar2.stop();

        ToyotaFactory toyotaFactory1 = new ToyotaFactory();
        ICar toyota1 = toyotaFactory1.createCar(1);
        toyota1.run();
        toyota1.stop();

        ToyotaFactory toyotaFactory2 = new ToyotaFactory();
        ICar toyota2 = toyotaFactory2.createCar(2);
        toyota2.run();
        toyota2.stop();
    }

}
